package band.wukong.practice.java.core.pack.lang;

import java.util.Map;
import java.util.Properties;

/**
 * As you see...
 *
 * @author wukong(wukonggg@139.com)
 */
public class SystemExample {

    public static void main(String[] args) {
//        printEvnVars();
        printProperties();
    }

    public static void printEvnVars() {
        Map<String, String> envMap = System.getenv();
        for (String key : envMap.keySet()) {
            System.out.println(key + ":  " + envMap.get(key));
        }
    }

    public static void printProperties() {
        Properties props = System.getProperties();
        for (Object key : props.keySet()) {
            System.out.println(key + ":" + props.get(key));
        }
    }
}
